package com.king.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.king.model.common.RestResponse;
import com.king.model.dto.BorrowBooksDto;
import com.king.model.dto.BorrowBooksParams;
import com.king.model.common.PageParams;
import com.king.model.common.PageResult;
import com.king.model.po.BorrowBooks;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author king
 * @since 2024-07-04
 */
public interface BorrowBooksService extends IService<BorrowBooks> {

    /**
     * @param borrowBooksParams
     * @param pageParams
     * @return java.util.List<com.king.model.dto.BorrowBooksDto>
     * @description 查询借阅图书list
     * @author King
     * @date 2024/7/4 12:49
     */
    PageResult<BorrowBooksDto> getBorrowBooks(BorrowBooksParams borrowBooksParams, PageParams pageParams);

    /***
    * @description 借阅
    *
    * @return com.king.model.common.RestResponse<java.lang.Boolean>
    * @author King
    * @date 2024/7/4 14:11
    */
    RestResponse<Boolean> borrow(Integer id, Integer userId);

    /**
    * @description 归还图书
    * @param borrowId
    * @return com.king.model.common.RestResponse<java.lang.Boolean>
    * @author King
    * @date 2024/7/4 14:17
    */
    RestResponse<Boolean> returnBook(Integer borrowId);
}
